-- card: 9227 from stack: in -- bmap block id: 9607 -- flags: 0000 -- background id: 8891 -- name: ----- HyperTalk script ----- on mouseUp hide card field "info" end mouseUp on openCard global match global source set the scroll of card field "names" to 0 put empty into source hide card field "info" set the hilite of button "Match exact" to true put empty into match end openCard -- part 1 (button) -- low flags: 00 -- high flags: A003 -- rect: left=207 top=311 right=333 bottom=307 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Go Back ----- HyperTalk script ----- on mouseUp set the scroll of card field "names" to 0 set the hilite of button "hiliteRegion" to false put empty into card field "lineF" put empty into card field "itemF" put empty into card field "searchF" visual effect iris close go to card id 8200 end mouseUp -- part 2 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=161 top=33 right=56 bottom=375 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 2 -- text size: 18 -- style flags: 0 -- line height: 24 -- part name: -- part 3 (field) -- low flags: 01 -- high flags: 2007 -- rect: left=128 top=87 right=187 bottom=401 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: names -- part 4 (button) -- low flags: 00 -- high flags: A003 -- rect: left=143 top=201 right=223 bottom=243 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Find... ----- HyperTalk script ----- on mouseUp global source global lastPos global match put empty into card field "searchF" set the scroll of card field "names" to 0 set the hilite of button "hiliteRegion" to false ask "Find what state or capitol?" with source if it is not empty then put it into source put find( card field "names", match & source ) into lastPos if item 1 of lastPos=0 then put empty into card field "lineF" put empty into card field "itemF" put "Search string not found" into card field "searchF" set the hilite of button "hiliteRegion" to false else put "Line"&&item 1 of lastPos into card field "lineF" put "Item"&&item 2 of lastPos into card field "itemF" put "Search string found in:" into card field "searchF" put (the textHeight of card field "names")* (item 1 of lastPos - 1) into scrollAmount set the scroll of card field "names" to scrollAmount set the hilite of button "hiliteRegion" to true end if end if end mouseUp -- part 12 (field) -- low flags: 01 -- high flags: 2002 -- rect: left=270 top=265 right=287 bottom=329 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: lineF -- part 13 (field) -- low flags: 01 -- high flags: 2002 -- rect: left=357 top=265 right=287 bottom=413 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: itemF -- part 14 (field) -- low flags: 01 -- high flags: 2002 -- rect: left=111 top=265 right=287 bottom=240 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: searchF -- part 20 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=129 top=88 right=109 bottom=384 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: hiliteRegion -- part 21 (button) -- low flags: 00 -- high flags: A003 -- rect: left=143 top=228 right=250 bottom=243 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Find Next ----- HyperTalk script ----- on mouseUp global lastPos global source global match put empty into card field "searchF" put find( card field "names", match & source, item 1 of lastPos, item 2 of lastPos ) into lastPos if item 1 of lastPos=0 then put empty into card field "lineF" put empty into card field "itemF" put "Search string not found" into card field "searchF" set the hilite of button "hiliteRegion" to false else put "Line"&&item 1 of lastPos into card field "lineF" put "Item"&&item 2 of lastPos into card field "itemF" put "Search string found in:" into card field "searchF" put (the textHeight of card field "names")* (item 1 of lastPos - 1) into scrollAmount set the scroll of card field "names" to scrollAmount set the hilite of button "hiliteRegion" to true end if end mouseUp -- part 24 (button) -- low flags: 00 -- high flags: E005 -- rect: left=267 top=218 right=238 bottom=377 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Match exact ----- HyperTalk script ----- on mouseUp global match if the hilite of button "Match exact" then put empty into match else put "<" into match end if end mouseUp -- part 23 (field) -- low flags: 81 -- high flags: 2002 -- rect: left=50 top=71 right=338 bottom=468 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: info -- part contents for card part 2 ----- text ----- Find Demo -- part contents for card part 3 ----- text ----- Montgomery,Alabama,AL Juneau,Alaska, Pheonix,Arizona,AZ Little Rock,Arkansas, Sacramento,California,CA Denver,Colorado,CO Hartford,Connecticut,CT Dover,Delaware,DE District of Columbia,Washington,DC Tallahassee,Florida,FL Atlanta,Georgia,GA Honolulu,Hawaii,HI Boise,Idaho,ID Springfield,Illinois,IL Indianapolis,Indiana,IN Des Moines,Iowa Topeka,Kansas,KS Frankfort,Kentucky,KY Baton Rouge,Lousiana,LA Augusta,Maine,ME Annapolis,Maryland,MD Boston,Massachusetts,MA Lansing,Michigan,MI St. Paul,Minnesota,MN Jackson,Mississippi,MS Jefferson City,Missouri,MO Helena,Montana,MT Lincoln,Nebraska,NE Carson City,Nevada,NV Concord,New Hampshire,NH Trenton,New Jersey,NJ Albany,New York,NY Raleigh,North Carolina,NC Bismarck,North Dakota,ND Columbus,Ohio,OH Oklahoma City,Oklahoma,OK Salem,Oregon,OR Harrisburg,Pennsylvania,PA Providence,Rhode Island,RI Columbia,South Carolina,SC Pierre,South Dakota,SD Nashville,Tennessee,TN Austin,Texas,TX Salt Lake City,Utah,UT Montpelier,Vermont,VT Richmond,Virginia,VA Olympia,Washington,WA Charleston,West Virginia,WV Madison,Wisconsin,WI Cheyene,Wyoming,WY -- part contents for card part 23 ----- text ----- The syntax for the find command is: position = FIND( target, source [ ,afterLine [ ,afterItem ] ] ) The target is any container through which you want to search. The source is any container, variable or string for which you   want to search. If the source string begins with the “<”   character then the search is for any match of the source in   the target. (The “<” character is not treated as part of the   string.) Otherwise, the search is for an exact match of the   source with an item in the target. The afterLine is an optional parameter specifying the line after   which to begin searching. The afterItem is an optional parameter specifying the item   after which to begin searching.